package com.jiwei.community.controller;

import com.jiwei.community.service.RecommendService;
import com.jiwei.community.utils.SecurityUtils;
import com.jiwei.community.vo.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 季伟
 * @date 2024/4/9
 */
@RestController
@RequestMapping("/recommend")
public class RecommendController {
    @Autowired
    RecommendService recommendService;
//    @PutMapping("/score/view")
//    public ResponseResult updateScoreByView(Long postId){
//        Long userId = null;
//        try {
//            userId = SecurityUtils.getUserId();
//        }catch (Exception ignore){
//
//        }
//        if (userId == null){
//            return ResponseResult.okResult("未登录无需更新评分");
//        }
//        return recommendService.updateScoreByView(userId,postId);
//    }


}
